package cn.com.aisat.android.videoshow.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import cn.com.aisat.android.videoshow.R;
import cn.com.aisat.android.videoshow.data.TVMovieItem;


public  class TvNumberAdapter extends BaseAdapter{
	Context context;
	LayoutInflater inflater;
	TVMovieItem item;
	public TvNumberAdapter(Context context,TVMovieItem item){
		this.context=context;
		this.item=item;
				
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		  
		return item.getCount();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return item;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		inflater=LayoutInflater.from(context);
		convertView=inflater.inflate(R.layout.search_button, null);
		TextView button = (TextView) convertView.findViewById(R.id.search_button);
		button.setText(""+(getItemId(position)+1));
		return convertView;
	} 
	
}
